/**
 * 
 */
package com.googlecode.pcapj.bridj;

import org.bridj.Pointer;
import org.bridj.StructObject;

/**
	typedef struct ip_address
	{
		u_char byte1;
		u_char byte2;
		u_char byte3;
		u_char byte4;
	}ip_address; 
 */
public class ip_address extends u_int32_t {
    public ip_address() { super(); }
    public ip_address(Pointer<? extends StructObject> pointer) { super(pointer); }
	public ip_address(u_int32_t u_int32_t) {super(u_int32_t);}
	@Override
    public String toString(){
    	StringBuffer buffer = new StringBuffer();
    	buffer.append(0xff & byte1());
    	buffer.append(".");
    	buffer.append(0xff & byte2());
    	buffer.append(".");
    	buffer.append(0xff & byte3());
    	buffer.append(".");
    	buffer.append(0xff & byte4());
    	return buffer.toString();
    }
}
